package com.example.dahua.templateMethod;

/**
 * @author: dangwen
 * @createDate: 2021/7/3
 */
public class Person {
    private TravelTemplate travelTemplate;
    public Person(TravelTemplate travelTemplate){
        this.travelTemplate = travelTemplate;
    }

    public void doTravel(){
        travelTemplate.toTravel();
    }


    public static void main(String[] args) {
        Person p = new Person(new TravelPlan1());
        p.doTravel();
    }
}
